<!--
*Author：富行天下团队
 *
 *代码由框架生成,任何更改都可能导致被代码生成器覆盖
 *业务请在@/extension/mall/Mall_good.js此处编写
 -->
<template>
    <div>
        <view-grid
                   ref="grid"
                   :columns="columns"
                   :detail="detail"
                   :editFormFields="editFormFields"
                   :editFormFileds="editFormFields"
                   :editFormOptions="editFormOptions"
                   :searchFormFields="searchFormFields"
                   :searchFormFileds="searchFormFields"
                   :searchFormOptions="searchFormOptions"
                   :table="table"
                   :extend="extend">
        </view-grid>
    </div>
</template>

<script>
    import extend from "@/extension/mall/Mall_good.js";
    import ViewGrid from "@/components/basic/ViewGrid.vue";
    var vueParam = {
        components: {
            ViewGrid
        },
        data() {
            return {
                table: {
                    key: 'id',
                    footer: "Foots",
                    cnName: '商品管理',
                    name: 'Mall_good',
                    url: "/Mall_good/",
                    sortName: "createDate"
                },
                extend: extend,
                editFormFields: {"name":"","name2":"","productID":"","originalPrice":"","preferentialPrice":"","attributes":"","modifier":"","modifyDate":"","modifyID":"","createDate":"","createID":"","creator":""},
                editFormOptions: [
                                [{"title":"商品名称","required":true,"field":"name","type":"text"},
                               {"title":"简称","required":true,"field":"name2","type":"text"}],
                               [{"title":"产品ID","required":true,"field":"productID","type":"text"},
                               {"title":"原价","required":true,"field":"originalPrice","type":"text"}],
                               [{"title":"优惠价","required":true,"field":"preferentialPrice","type":"text",},
                               {"title":"属性","required":true,"field":"attributes","type":"select","dataKey": "unit",}]],
                searchFormFields: {"name":"","name2":"",},
                searchFormOptions: [[{"title":"名称","field":"name","type":"text"},{"title":"简称","field":"name2","type":"text"},]],
                columns: [{field:'id',title:'主键',type:'string',width:90,hidden:true,readonly:true,require:true,align:'left'},
                       {field:'name',title:'名称',type:'string',width:220,align:'left',sortable:true},
                       {field:'name2',title:'简称',type:'string',width:220,align:'left'},
                       {field:'productID',title:'产品ID',type:'string',width:90,align:'left'},
                       {field:'originalPrice',title:'原价',type:'decimal',width:110,align:'left'},
                       {field:'preferentialPrice',title:'优惠价',type:'decimal',width:90,align:'left'},
                       {field:'attributes',title:'属性',bind:{ key:'pro_type',data:[]},type:'string',width:220,align:'left'},
                       {field:'modifier',title:'修改人',type:'string',width:180,align:'left'},
                       {field:'modifyDate',title:'修改时间',type:'datetime',width:135,align:'left',sortable:true},
                      // {field:'modifyID',title:'修改人ID',type:'int',width:90,hidden:true,align:'left'},
                       {field:'createDate',title:'创建时间',type:'datetime',width:135,align:'left',sortable:true},
                       //{field:'createID',title:'创建人ID',type:'int',width:90,hidden:true,align:'left'},
                       {field:'creator',title:'创建人',type:'string',width:180,align:'left'},
                    //    {field:'spare1',title:'扩展字段1',type:'string',width:220,align:'left'},
                    //    {field:'spare2',title:'扩展字段1',type:'string',width:220,align:'left'},
                    //    {field:'spare3',title:'扩展字段1',type:'string',width:220,align:'left'},
                    //    {field:'spare4',title:'扩展字段1',type:'string',width:220,align:'left'},
                    //    {field:'spare5',title:'扩展字段1',type:'string',width:220,align:'left'},
                    //    {field:'spare6',title:'扩展字段1',type:'string',width:220,align:'left'},
                    //    {field:'spare7',title:'扩展字段1',type:'string',width:220,align:'left'},
                    //    {field:'spare8',title:'扩展字段1',type:'string',width:220,align:'left'},
                    //    {field:'spare9',title:'扩展字段1',type:'string',width:220,align:'left'},
                    //    {field:'spare10',title:'扩展字段1',type:'string',width:220,align:'left'},
                    //    {field:'spare11',title:'扩展字段1',type:'string',width:220,align:'left'},
                    //    {field:'spare12',title:'扩展字段1',type:'string',width:220,align:'left'},
                    //    {field:'spare13',title:'扩展字段1',type:'string',width:220,align:'left'},
                    //    {field:'spare14',title:'扩展字段1',type:'string',width:220,align:'left'},
                    //    {field:'spare15',title:'扩展字段1',type:'string',width:220,align:'left'},
                     ],
                detail: {
                    cnName:"#detailCnName",
                    columns: [],
                    sortName: "",
                    key:""
                }
            };
        }
    };
    export default vueParam;
</script>
